﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MrPP.SerriedCabinet
{
    public class CheckClicked : MonoBehaviour
    {
        [SerializeField]
        private SecondScreen _secone;
        [SerializeField]
        private CheckPost _post;
        [SerializeField]
        private ShelveModel _shelveModel;
        public void doShelve()
        {
            if (_secone.isOpen == 2)
            {
                _shelveModel.doStop();
            }
            else  
            {
                _shelveModel.doPlay();
            }
        }
        public void doClicked() {
            if (_secone.isOpen == 1)
            {
                _post.doStop();
            }
            else {

                _post.doPlay();
            }
        
        }
    }
}